//
//  BGShoppingMallViewController.m
//  bingke
//
//  Created by  on 12-10-24.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "BGShoppingMallViewController.h"

@implementation BGShoppingMallViewController

@synthesize scrollView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"BGMenuView" owner:self options:nil];
    BGMenuView *footView = [array objectAtIndex:0];
    footView.frame = [BGMenuView getHideFrame];
    [self.view addSubview:footView];
    footView.backgroundColor = [UIColor clearColor];
    
    NSArray *headViewArray = [[NSBundle mainBundle] loadNibNamed:@"BGHeadView" owner:self options:nil];
    BGHeadView *headView = [headViewArray objectAtIndex:0];
    headView.frame = CGRectMake(0, 0, 320, 83);
    [self.view addSubview:headView];
    headView.backgroundColor = [UIColor clearColor];
    
    scrollView.contentSize = CGSizeMake(320, 600);
    scrollView.contentOffset = CGPointMake(0, 0);
    scrollView.scrollEnabled = YES;
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (void)dealloc 
{
    [super dealloc];
}
@end
